while True:
    try:
        score = int(input('请输入百分制成绩：'))
        assert score >= 0 and score <= 100
        if score >= 90:
            print('优')
        elif score >= 80:
            print('良')
        elif score >= 70:
            print('中')
        elif score >=60:
            print('及格')
        else:
            print('不及格')
    except Exception as e:
        print('异常信息：', e)
        break